<template>
  <div class="home">
    <h2>首页</h2>
    <div v-if="user.role === 'admin'">
      <router-link to="/activity-management">活动管理</router-link>
    </div>
    <div>
      <router-link to="/public-activities">公开活动列表</router-link>
    </div>
  </div>
</template>

<script>
export default {
  computed: {
    user() {
      return this.$store.state.user;
    }
  }
};
</script>